package com.simple_factory;

/**
 * 手机店
 */
public class PhoneStore {
    public static void main(String[] args) {
        // 创建智能手机
        Phone phone1 = simplePhoneFactory.createPhoneme("smart");
        if (phone1 != null) {
            phone1.open();
            phone1.call();
        }

        // 创建老年人机
        Phone phone2 = simplePhoneFactory.createPhoneme("old");
        if (phone2 != null) {
            phone2.open();
            phone2.call();
        }

        // 测试错误输入
        Phone phone3 = simplePhoneFactory.createPhoneme("satellite");
        if (phone3 != null) {
            phone3.call();
        }
    }
}
